<?php
require '../../config.php';
$query = $GLOBALS['db']->query("SELECT title, pretext, text FROM ".$GLOBALS['db_prefix']."articles WHERE id = '".intval($_GET['id'])."' LIMIT 1");
$data = $query->fetch_array();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<title><?=$data['title']?></title>
<link rel="stylesheet" href="print.css" type="text/css" />

</head>
<body onload="window.print();">
<?php

/**
 * @author Martin Pernica
 * @copyright 2009
 */
	echo '<div id="print">';
	echo '<h2 class="title">'.$data['title'].'</h2>';
	echo '<p class="pretext">'.$data['pretext'].'</p>';
	echo '<p class="pretext">'.$data['text'].'</p>';
	echo '</div>';
?>
</body>
</html>